package de.hub.sar.itsec.sslfetcher.log;

import java.io.PrintStream;

public final class Logger {
	private static Logger _instance = null;
	
	public static Logger getInstance() {
		if (_instance == null) {
			_instance = new Logger(System.out, System.err);
		}
		
		return _instance;
	}
	
	private PrintStream out;
	private PrintStream err;
	
	public Logger(final PrintStream out, final PrintStream err) {
		this.out = out;
		this.err = err;
	}
	
	public void error(final String msg) {
		this.err.println(msg);
	}
	
	public void info(final String msg) {
		this.out.println(msg);
	}

	public void warn(String msg) {
		this.out.println(msg);
	}

	public void line() {
		this.out.println();
	}
}
